#include "../../core/src/netservice.h"
#include "setting.h"
#include "server.h"
#include "networkassist.h"

NetworkAssist::NetworkAssist(Server &server) :
    m_server(server)
{

}

NetworkAssist::~NetworkAssist()
{

}

bool NetworkAssist::startNetwork()
{
    int ret = 0;

    ret = m_server.netService()->open
            (
                m_server.settings()->settingData< NetSettingData >()->listenHost,
                m_server.settings()->settingData< NetSettingData >()->listenPort,
                0
            );

    if(ret){
        LOG_ERROR() << strerror(ret);
        return false;
    }
}
